Don't visit the same unit multiple times.
authorGeoffry Song <goffrie@dropbox.com>
Thu, 21 Sep 2017 19:15:49 +0000 (12:15 -0700)
committerGeoffry Song <goffrie@dropbox.com>
Thu, 21 Sep 2017 19:18:14 +0000 (12:18 -0700)
commit6e53b55d807fffa90baa5402f35dbfb055c73d19
tree4bdf7975dc837a3f7a3f598807e6262797b8f075
parenta5b734d92541b1f246555287c5158c777ca2cb28
Don't visit the same unit multiple times.

This fixes some accidentally-exponential behaviour we were seeing in our
fairly large workspace. It brings a no-op cargo run from about 10
seconds to 0.3 seconds on my machine.

Also changes an association list to a hashmap because that was showing
up in profiles too.
src/cargo/core/package.rs
src/cargo/ops/cargo_rustc/context.rs